import {defineConfig} from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import UnoCss from 'unocss/vite';
import AutoImport from 'unplugin-auto-import/vite';

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        react(),
        UnoCss(),
        AutoImport({
            dts: './src/auto/auto-imports.d.ts', //此文件配置保存后系统自动生成
            imports: ['react', 'react-router'], //此处可填写需要自动引入的库
        }),
    ],
    resolve: {
        alias: {
            '@': path.resolve(__dirname, 'src'),
        },
    },
});
